package com.wl.common.core.enums;


/**
 * @author: wanglin
 * @date: 2023-09-20 周三
 * @Version: 1.0
 * @Description:
 */
public enum SecurityErrorCode implements CustomErrorCode {
    BAD_REQUEST("BAD_REQUEST", "错误请求"),
    UNAUTHORIZED("UNAUTHORIZED", "抱歉，您没有访问权限"),
    FORBIDDEN("FORBIDDEN", "禁止访问"),
    INTERNAL_SERVER_ERROR("INTERNAL_SERVER_ERROR", "网络异常"),
    UNKNOWN("UNKNOWN", "未知异常"),
    SYSTEM_EXCEPTION("SYSTEM_EXCEPTION", "系统异常"),
    SERVICE_EXCEPTION("SERVICE_EXCEPTION", "服务异常");

    private final String code;
    private final String description;

    SecurityErrorCode(String code, String description) {
        this.code = code;
        this.description = description;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getDescription() {
        return this.description;
    }

    @Override
    public String toString() {
        return String.format("Code:[%s], Description:[%s]. ", this.code, this.description);
    }
}
